// requirejs 相关配置
require.config({
    paths: {
		'angular': '../../js/lib/bower_components/angular/angular',
	    'angular-route': '../../js/lib/bower_components/angular-route/angular-route',
	    'angular-animate': '../../js/lib/bower_components/angular-animate/angular-animate',
	    'angular-touch': '../../js/lib/bower_components/angular-touch/angular-touch',
	    'common_dir': '../../js/directives/common_dir'
    },
    
    shim: {
    	'angular': {
        exports: 'angular'
	    },
	    'angular-route': {
	        deps: ['angular']
	    },
	    'angular-touch': {
	        deps: ['angular']
	    },
	    'angular-animate': {
	        deps: ['angular']
	    }
    }
});

//开始加载各类框架
require(['angular', 'angular-animate','controller','app','services','common_dir'], function(angular) {
 var $html = angular.element(document.getElementsByTagName('html')[0]);
 
 // domready后，手动启动扫描
 angular.element(document).ready(function() {
     angular.bootstrap($html, ['index']);
 });
});
 
